package com.onerway.api.factory;

import com.onerway.api.OnerWayClient;
import com.onerway.api.impl.OnerWayClientImpl;
import com.onerway.api.impl.OnerWaySignClientImpl;
import com.onerway.config.OnerWayConfig;

public class OnerWayClientFactory {

    public static OnerWayClient create(OnerWayConfig onerWayConfig) {
        return create(onerWayConfig, false);
    }

    public static OnerWayClient create(OnerWayConfig onerWayConfig, Boolean checkSign) {
        if (checkSign) {
            return new OnerWaySignClientImpl(onerWayConfig,new OnerWayClientImpl(onerWayConfig));
        } else {
            return new OnerWayClientImpl(onerWayConfig);
        }
    }
}
